﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DynamicWebProxy.Extensions
{
    public static class Extension
    {
        public static IEnumerable<T> WhereIF<T>(this IEnumerable<T> source, bool predicate, Func<T, bool> func)
        {
            if (predicate) return source.Where(func);
            return source;
        }
    }
}